package com.eastfair.common.api;
import com.eastfair.core.base.R;
import com.eastfair.pay.dto.ContractDTO;
import com.eastfair.pay.vo.ContractFinanceVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

@FeignClient(value = "mice-pay/contract")
public interface ContractFeign {

    /**
     * 保存合同
     * @param contractDTO
     * @return
     */
    @PostMapping("/saveOrUpdate")
    R saveOrUpdate(@RequestBody ContractDTO contractDTO);

    /**
     * 是否有认领记录
     * @param contractId
     * @return
     */
    @GetMapping("/isCollected/{contractId}")
    R isCollected(@PathVariable("contractId") Long contractId);


    /**
     * 合同付删除
     * @return
     */
    @GetMapping("/delete/{contractId}")
    R delete(@PathVariable("contractId") Long contractId);

    /**
     * 合同财务信息
     * @return
     */
    @GetMapping("/queryFinance/{contractId}")
    R<ContractFinanceVO> queryFinance(@PathVariable("contractId") Long contractId);
}
